# Maintainer: Bruno Pagani <archange@archlinux.org>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: William Rea <sillywilly@gmail.com>

pkgname=gtkdatabox
pkgver=1.0.0
pkgrel=1
pkgdesc="Widget for live display of large amounts of fluctuating numerical data"
arch=(loong64 x86_64)
url="https://sourceforge.net/projects/gtkdatabox/"
license=(LGPL)
depends=(gtk3 cairo pango glade)
makedepends=(gtk-doc)
source=(https://downloads.sourceforge.net/project/${pkgname}/${pkgname}-1/${pkgname}-${pkgver}.tar.gz)
sha256sums=('8bee70206494a422ecfec9a88d32d914c50bb7a0c0e8fedc4512f5154aa9d3e3')

prepare() {
  cd ${pkgname}-${pkgver}
  autoreconf -vfi
}

build() {
  cd ${pkgname}-${pkgver}
  ./configure --prefix=/usr \
    --disable-static \
    --enable-gtk-doc \
    --enable-gtk-doc-html \
    --enable-glade
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install
}
